<template>

	<body>
		<div class="details">
			<div class="my_nav">
				<ul>
					<li></li>
					<li>
						<p>我的</p>
					</li>
					<li>
						<router-link to="servicereminding">
							<i class="iconfont">&#xe657;</i>
						</router-link>
					</li>
				</ul>
			</div>
			<ul class="head_detail">
				<li>
					<div class="Head_portrait">
						<img v-if="user.icon" width="100%" :src="user.icon"/>
						<img v-else src="@/assets/img/touxiang.jpg" width="100%;">

					</div>
				</li>
				<li>
					<p>{{user.memberName}}</p>
				</li>
				<li>
					<router-link to="personalcenter">
						<i class="iconfont">&#xe62a;</i>
					</router-link>
				</li>
			</ul>
			
		</div>
		<div class="Assets">
			<ul>
				<li>
					<p>我的资产</p>
				</li>
				<li>
					<p>
						¥{{balance}}
					</p>
				</li>
				<li>
					<i class="iconfont col-r1">&#xe6e2;</i>
				</li>
			</ul>
		</div>
		<div class="My_line">

		</div>
		<div class="main_nav">
			<ul>
				<li>
					<router-link to="wallet">
						<i class="iconfont col_b">&#xe673;</i>
						<p>我的钱包</p>
					</router-link>
				</li>
				<li @click="$vux.toast.show({ type: 'cancel', text: '开发中' })">
					<i class="iconfont col_dr">&#xe626;</i>
					<p>积分商城</p>
				</li>
				<li @click="$vux.toast.show({ type: 'cancel', text: '开发中' })">
					<!-- <router-link to="coupon"> -->
					<i class="iconfont col_p">&#xe645;</i>
					<p>我的优惠券</p>
					<!-- </router-link> -->
				</li>
			</ul>
		</div>
		<div class="crude_line">

		</div>
		<div class="Vice-nav">
			<ul>
				<li>
					<router-link to="personalcenter">
						<p>我的信息</p>
					</router-link>
				</li>
				<li>
					<i class="iconfont">&#xe62a;</i>
				</li>
			</ul>
			<ul>
				<li>
					<router-link to="collection">
						<p>我的收藏</p>
					</router-link>
				</li>
				<li>
					<i class="iconfont">&#xe62a;</i>
				</li>
			</ul>
			<!-- <ul>
				<li>
					<p>关于软件</p>
				</li>
				<li>
					<i class="iconfont">&#xe62a;</i>
				</li>
			</ul> -->
			<router-link tag="ul" to="feedbackfeedback">
					<li>
						<p>意见反馈</p>
					</li>
					<li>
						<p class="col-gray"> 让我们更好</p>
					</li>
					<li>
						<i class="iconfont">&#xe62a;</i>
					</li>
			</router-link>
			<div class="crude_line">

			</div>
			<ul>
				<li>
					<router-link to="join">
						<p>加盟合作</p>
					</router-link>
				</li>
				<li>
					<i class="iconfont">&#xe62a;</i>
				</li>
			</ul>
			<ul>
				<li>
					<router-link to="enterprise">
						<p>公司信息</p>
					</router-link>
				</li>
				<li>
					<i class="iconfont">&#xe62a;</i>
				</li>
			</ul>
			<ul>
				<li @click="logout">
					<a>
						<p>退出</p>
					</a>
				</li>
				<li>
					<i class="iconfont">&#xe62a;</i>
				</li>
			</ul>
		</div>
		<div style="height:1.5rem;">

		</div>
	</body>
</template>

<script>
export default {
	data() {
		return {
			user: {},
			balance: 0,
			showHideOnBlur: false,
		}
	},
	created() {
		this.query()
	},
	methods: {
		query() {
			this.$http.get('/app/member/userInfo').then(json => {
				const { code, user } = json
				if (code === 0) {
					this.user = user
				}
			})
			this.$http.get('/app/member/balance').then(json => {
				const { code, balance } = json
				if (code === 0) {
					this.balance = balance
				}
			})
		},
		doShowToast() {
			this.$vux.toast.show({
				text: 'toast'
			})
		},
		logout() {
			this.$root.token = ''
			this.$router.push('/login')
		}
	}
}
</script>

<style>
</style>